#ifndef _INCL_MYCALC_H
#define _INCL_MYCALC_H


class Mycalc
{
mutable int bo;
public:
	Mycalc(){};
	
	int add(int a, int b)
	{
		return a+b;
	}
	int sub(int a, int b)
	{
		return a-b;
	}
	int bin_search(int a[], int lowIndex, int highIndex, int val)
	{
		// if (val< a[lowIndex] ||val> a[highIndex])
		// {
		// 	return -1;
		// }
		int mid = (lowIndex+highIndex)/2;
		if (val == a[mid])
		{
			return mid;
		}
		else if (val > a[mid])
		{
			return bin_search(a,mid+1,highIndex,val);
		}
		else if (val < a[mid])
		{
			return bin_search(a,lowIndex,mid-1,val);
		}
		return -1;
	}
	int sort_low2high(int a[],int size)
	{
		for (int i = 0; i < size; ++i)
		{
			for (int j = i+1; j < size; ++j)
			{
				if (a[i]>a[j]	)
				{
					int temp = a[i];
					a[i] = a[j];
					a[j] = temp;
				}
			}
		}
	}
};






#endif
